Skip to content

Conversation

@kaznovac
Copy link

Issue #, if available: #91
Fixes #91

Description of changes:
change services di configuration to use the xml instead of yaml
it's the symfony way... for example see doctrine bundle https://github.com/doctrine/DoctrineBundle/tree/2.10.x/Resources/config

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kaznovac kaznovac changed the title Kaznovac yamless Use xml instead of yml for initial service di configuration Aug 23, 2023
@brianfreytag
Copy link
Contributor

brianfreytag commented Dec 2, 2025

This should be closed as XML support is deprecated in Symfony 7.4 and removed in Symfony 8. The "Symfony Way" is moving to PHP configurations with no known deprecation date for YAML.

https://symfony.com/blog/new-in-symfony-7-4-deprecated-xml-configuration

@kaznovac
Copy link
Author

kaznovac commented Dec 2, 2025

Not quite... php config should be used insted both xml and yaml.

@brianfreytag
Copy link
Contributor

brianfreytag commented Dec 2, 2025

@kaznovac Kinda correct, but the current yaml configuration is still "more right" than converting the yaml to xml that this PR aims to do, which is the point of my comment to close this PR. XML configuration is deprecated in 7.4 and removed in 8.0. Yaml is still the default format for Symfony and Recipes.

Per the blog post, "YAML will remain the default format used by Symfony and by the Symfony recipes, but you can also use PHP if you prefer a fully code-based configuration."

Per this blog post: https://symfony.com/blog/new-in-symfony-7-4-better-php-configuration

"We’re not ready yet to make this new format the recommended one. YAML still offers many advantages. However, this update opens the door to using PHP as a first-class configuration format in the future. The new approach is concise, expressive, easy to maintain, well-supported by modern tools, and benefits from the full power of PHP. What’s still missing? Not all static analyzers and IDEs fully support complex array shapes yet, Symfony Flex currently understands YAML only, and a few other pieces still need refinement before this vision can become reality. Even so, this marks an exciting step toward a more unified, powerful, and developer-friendly configuration experience in Symfony."

@kaznovac
Copy link
Author

kaznovac commented Dec 2, 2025

Yaml is for developers using your bundle - external configuration
PHP (more performant, and no dependencies) for internal configuration
See any official Symfony bundle

@brianfreytag
Copy link
Contributor

@kaznovac In either case, this PR is going backward not forward. Why so defensive?

@kaznovac
Copy link
Author

kaznovac commented Dec 2, 2025

This PR can be rewritten
What do you mean by defensive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As initial service config is in YAML format symfony/yaml should be required package

2 participants